package com.seari.bean;

public class ImgProgress {

    private String contemplateid;
    private String conId;
    private String parentid;
    private String conname;
    private String progressRate;
    private String proId;
    private String level;
    private double contemplateunitprice;
    private double num;
    private double contemplatenum;
    private double contemplatenumAll;
    private String name;
    private double value;
    private String ZLNum;
    private String WCNum;

    private int status = 3;//0 未开始 1 进行中 2 已完成 3总览
    private int page;
    private int limit;
    private int start;


    public String getWCNum() {
        return WCNum;
    }

    public void setWCNum(String WCNum) {
        this.WCNum = WCNum;
    }

    public String getZLNum() {
        return ZLNum;
    }

    public void setZLNum(String ZLNum) {
        this.ZLNum = ZLNum;
    }

    public double getContemplatenumAll() {
        return contemplatenumAll;
    }

    public void setContemplatenumAll(double contemplatenumAll) {
        this.contemplatenumAll = contemplatenumAll;
    }

    public double getNum() {
        return num;
    }

    public void setNum(double num) {
        this.num = num;
    }

    public double getContemplatenum() {
        return contemplatenum;
    }

    public void setContemplatenum(double contemplatenum) {
        this.contemplatenum = contemplatenum;
    }

    public double getContemplateunitprice() {
        return contemplateunitprice;
    }

    public void setContemplateunitprice(double contemplateunitprice) {
        this.contemplateunitprice = contemplateunitprice;
        double comteNums = (this.contemplatenum*this.contemplateunitprice);
        if(comteNums == 0){
            this.progressRate ="0%";
            this.value = 0;
        }else{
           double seNum = ((this.num*this.contemplateunitprice)/comteNums*100);
            System.out.println("seNum>>bef>>"+seNum);
            seNum = (double) Math.round(seNum * 100) / 100;
            System.out.println("seNum>>end>>"+seNum);
            this.progressRate = seNum+"%";
            this.value = seNum;
        }
        double WCNums = num*this.contemplateunitprice;
        WCNums = (double) Math.round(WCNums * 100) / 100;
        this.WCNum = WCNums+"万";
        double AllNums = contemplatenumAll*this.contemplateunitprice;
        AllNums = (double) Math.round(AllNums * 100) / 100;
        this.ZLNum = AllNums+"万";
    }

    public void setProgressRate(String progressRate) {
        this.progressRate = progressRate;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getLimit() {
        return limit;
    }

    public void setLimit(int limit) {
        this.limit = limit;
    }

    public int getStart() {
        return start;
    }

    public void setStart(int start) {
        this.start = start;
    }

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    public String getProId() {
        return proId;
    }

    public void setProId(String proId) {
        this.proId = proId;
    }

    public String getContemplateid() {
        return contemplateid;
    }

    public void setContemplateid(String contemplateid) {
        this.contemplateid = contemplateid;
    }


    public String getConId() {
        return conId;
    }

    public void setConId(String conId) {
        this.conId = conId;
    }

    public String getParentid() {
        return parentid;
    }

    public void setParentid(String parentid) {
        this.parentid = parentid;
    }

    public String getConname() {
        return conname;
    }

    public void setConname(String conname) {
        this.conname = conname;
        if(conname.length() > 6){
            this.name = conname.substring(0,7)+"...";
        }else {
            this.name = this.progressRate;
        }
    }

    public String getProgressRate() {
        return progressRate;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getValue() {
        return value;
    }

    public void setValue(double value) {
        this.value = value;
    }
}
